import React from "react";
import { Navigate } from "react-router-dom";
const Home = React.lazy(() => import("../views/home"));
const Login = React.lazy(() => import("../views/login"));
const MainLayout = React.lazy(() => import("../views/mainLayout"));
const Set = React.lazy(() => import("../views/set"));

export const routerList = [
  {
    path: "/home",
    element: <MainLayout><Home></Home></MainLayout>,
  },
  {
    path: "/set",
    element: <MainLayout><Set></Set></MainLayout>,
    roles: ["admin"],
  },
  {
    path: "/login",
    element: <Login></Login>,
  },
  {
    path: "/",
    element: <Navigate to="/login"></Navigate>,
  },
];
